package com.VolunteerPlatform.Dao;

import com.VolunteerPlatform.Entity.VolunteerRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface VolunteerRecordDao {

    public List<VolunteerRecord> getAllVolunteerRecord(@Param("IDCardNumber") String IDCardNumber, @Param("Name") String Name, @Param("TeamName") String TeamName, @Param("StartDate") String StartDate, @Param("EndDate") String EndDate, @Param("Unit") String Unit,@Param("AdminID") String AdminID, @Param("Page") int Page, @Param("PageList") int PageList);

    public int insertVolunteerRecord(@Param("IDCardNumber") String IDCardNumber,@Param("Name") String Name,@Param("TeamName") String TeamName,@Param("Date") String Date,@Param("StartTime") String StartTime,@Param("EndTime") String EndTime,@Param("TeamNumber") int TeamNumber,@Param("Duration") double Duration,@Param("AdminID") String AdminID);

    public int updateVolunteerRecord(@Param("IDCardNumber") String IDCardNumber,@Param("Name") String Name,@Param("TeamName") String TeamName,@Param("NewTeamName") String NewTeamName,@Param("Date") String Date,@Param("NewDate") String NewDate,@Param("StartTime") String StartTime,@Param("EndTime") String EndTime,@Param("TeamNumber") int TeamNumber,@Param("Duration") double Duration,@Param("AdminID") String AdminID);

    public int deleteVolunteerRecord(@Param("IDCardNumber") String IDCardNumber,@Param("TeamName") String TeamName,@Param("Date") String Date);

    public int updateVolunteerRecordBatch(@Param("UpdateList") List<Map<String,String>> list);
}
